import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect: "/login"
        },
        {
            path: '/home',
            component: resolve => require(['@/components/common/Home.vue'], resolve),
            children: [
                // ---------------------校园系统
                // --学校管理
                {
                    path: '/school',
                    component: resolve => require(['../components/campus/school/school.vue'], resolve)
                },
                {
                    path: '/newSchool',
                    component: resolve => require(['../components/campus/school/newSchool.vue'], resolve)
                },
                {
                    path: '/schoolDet',
                    component: resolve => require(['../components/campus/school/schoolDet.vue'], resolve)
                },
                // --班级管理
                {
                    path: '/class',
                    component: resolve => require(['../components/campus/class/class.vue'], resolve)
                },
                {
                    path: '/newClass',
                    component: resolve => require(['../components/campus/class/newClass.vue'], resolve)
                },
                {
                    path: '/classDet',
                    component: resolve => require(['../components/campus/class/classDet.vue'], resolve)
                },
                // ------------------------------体测系统
                // --评分标准(权重计算)
                {
                    path: '/benchmark',
                    component: resolve => require(['../components/physicalTest/physicalBenchmark/benchmark.vue'], resolve)
                },
                // --体测管理
                {
                    path: '/physicalTest',
                    component: resolve => require(['../components/physicalTest/physicalTest/physicalTest.vue'], resolve)
                },
                // --新增体测
                {
                    path: '/newPhysicalTest',
                    component: resolve => require(['../components/physicalTest/physicalTest/newPhysicalTest.vue'], resolve)
                },
                // --体测信息
                {
                    path: '/physicalInfo',
                    component: resolve => require(['../components/physicalTest/physicalTest/physicalInfo.vue'], resolve)
                },
                // --体测成绩
                {
                    path: '/physicalScore',
                    component: resolve => require(['../components/physicalTest/physicalScore/physicalScore.vue'], resolve)
                },
                // 成绩导入
                {
                    path: '/phyScoreImport',
                    component: resolve => require(['../components/physicalTest/physicalScore/phyScoreImport.vue'], resolve)
                },
                // 成绩导入结果
                {
                    path: '/scoreImportResult',
                    component: resolve => require(['../components/physicalTest/physicalScore/scoreImportResult.vue'], resolve)
                },
                // --体测成绩详情
                {
                    path: '/phyScoreDetail',
                    component: resolve => require(['../components/physicalTest/physicalScore/phyScoreDetail.vue'], resolve)
                },

                // --数据统计
                {
                    path: '/statistics',
                    component: resolve => require(['../components/physicalTest/physicalStatistics/statistics.vue'], resolve)
                },
                // --体测统计详情
                {
                    path: '/statisDetail',
                    component: resolve => require(['../components/physicalTest/phyStatisDetail/phyStatisDetail.vue'], resolve)
                },
                // --体测分析报告
                {
                    path: '/physicalReport',
                    component: resolve => require(['../components/physicalTest/physicalReport/physicalReport.vue'], resolve)
                },
                // ---------------------------用户系统
                // --教师管理
                {
                    path: '/teacher',
                    component: resolve => require(['../components/user/teacher/teacher.vue'], resolve)
                },
                {
                    path: '/newTeacher',
                    component: resolve => require(['../components/user/teacher/newTeacher.vue'], resolve)
                },
                {
                    path: '/teacherDet',
                    component: resolve => require(['../components/user/teacher/teacherDet.vue'], resolve)
                },
                {
                    path: '/importTeac',
                    component: resolve => require(['../components/user/teacher/importTeac.vue'], resolve)
                },
                {
                    path: '/teac-importResult',
                    component: resolve => require(['../components/user/teacher/importResult.vue'], resolve)
                },
                // --学生
                {
                    path: '/student',
                    component: resolve => require(['../components/user/student/student.vue'], resolve)
                },
                {
                    path: '/newStudent',
                    component: resolve => require(['../components/user/student/newStudent.vue'], resolve)
                },
                {
                    path: '/studentDet',
                    component: resolve => require(['../components/user/student/studentDet.vue'], resolve)
                },
                {
                    path: '/importStu',
                    component: resolve => require(['../components/user/student/importStu.vue'], resolve)
                },
                {
                    path: '/stu-importResult',
                    component: resolve => require(['../components/user/student/importResult.vue'], resolve)
                },
                // ------------------------教改系统
                // 教改方案
                {
                    path: '/educationalPlan',
                    component: resolve => require(['../components/education/educationalPlan/educationalPlan.vue'], resolve)
                },
                // 适用学校
                {
                    path: '/applicableSchools',
                    component: resolve => require(['../components/education/applicableSchools/applicableSchools.vue'], resolve)
                },
                // 数据统计
                {
                    path: '/dataStatis',
                    component: resolve => require(['../components/education/dataStatis/dataStatis.vue'], resolve)
                },

                // --------------------权限管理
                {
                    path: '/accountNumber',
                    component: resolve => require(['../components/permission/accountNumber.vue'], resolve)
                },
                {
                    path: '/newAccount',
                    component: resolve => require(['../components/permission/newAccount.vue'], resolve)
                },
                {
                    path: '/accountDet',
                    component: resolve => require(['../components/permission/accountDet.vue'], resolve)
                },

                // --------------------体育课系统
                {
                    path: '/peScore',
                    component: resolve => require(['../components/peClass/peScore.vue'], resolve)
                },
                {
                    path: '/peStandard',
                    component: resolve => require(['../components/peClass/peStandard.vue'], resolve)
                },
                {
                    path: '/peStatistics',
                    component: resolve => require(['../components/peClass/statistics.vue'], resolve)
                },

                // -------------------手环管理
                {
                    path: '/bracelet',
                    component: resolve => require(['../components/bracelet/bracelet.vue'], resolve)
                },
                {
                    path: '/newBracelet',
                    component: resolve => require(['../components/bracelet/newBracelet.vue'], resolve)
                },
                {
                    path: '/importBracelet',
                    component: resolve => require(['../components/bracelet/importBracelet.vue'], resolve)
                },
                {
                    path: '/abnormalBrac',
                    component: resolve => require(['../components/bracelet/abnormalBrac.vue'], resolve)
                },

                // --------------------标签管理

                {
                    path: '/tags',
                    component: resolve => require(['../components/tags/tag/tag.vue'], resolve)
                },
                //建议管理
                {
                    path: '/suggestion',
                    component: resolve => require(['../components/tags/suggestion/suggestion.vue'], resolve)
                },
                // ---------------------------健康数据
                // 学生健康档案
                {
                    path: '/healthRecord',
                    component: resolve => require(['../components/healthData/healthRecord.vue'], resolve)
                },
                {
                    path: '/healthRecordInfo',
                    component: resolve => require(['../components/healthData/healthRecordInfo.vue'], resolve)
                },
            ]
        },
        {
            path: "/login",
            component: resolve => require(['@/components/login/login.vue'], resolve)
        },
        // --体测标准
        {
            path: '/physicalStandard',
            component: resolve => require(['../components/physicalTest/physicalStandard.vue'], resolve)
        },
    ]
})
